import request from '@/utils/request'

const api = '/admin/mem/info'

export default {
  getPageList (parameter, queryParam) {
    return request({
      url: `${api}/${parameter.pageNo}/${parameter.pageSize}`,
      method: 'post',
      params: queryParam
    })
  },
  lock: function (id, isDisabled) {
    return request({
      url: `${api}/lock/${id}/${isDisabled}`,
      method: 'patch'
    })
  },
  show (id) {
    return request({
      url: `${api}/show/${id}`,
      method: 'get'
    })
  },
  remove (id) {
    return request({
      url: `${api}/${id}`,
      method: 'delete'
    })
  },
  add (memInfo) {
    return request({
      url: `${api}/add`,
      method: 'post',
      data: memInfo
    })
  },
  edit (memInfo) {
    return request({
      url: `${api}/updateMemInfo`,
      method: 'post',
      data: memInfo
    })
  }
}
